exports.asString = function asString(str) {
  if (Array.isArray(str)) {
    return str.join("\n");
  }
  return str;
}

exports.indent = function indent(s) {
  if (Array.isArray(s)) {
    return s.map(indent).join("\n");
  } else {
    const str = s.trimRight();
    if (!str) return "";
    const ind = str[0] === "\n" ? "" : "\t";
    return ind + str.replace(/\n([^\n])/g, "\n\t$1");
  }
}